package Day011_多线程1.ZuoYe;

/**
 * @author zhangyan
 * @date 2020/4/28 17:03
 */
public class Test5 {
    public static void main(String[] args) {

        //匿名Thread子类
        Thread t = new Thread(){
            @Override
            public void run() {
                int sum = 0;
                for (int i = 1; i <= 100; i++) {
                    sum += i;
                }
                System.out.println("sum=" + sum);
            }
        };
        t.start();
    }
}
